package testing_package;

public class Popping implements Runnable {

    private CommonResource commonResource;

    public Popping(CommonResource commonResource) {
        this.commonResource = commonResource;
    }

    public void run() {
        for (int i = 0; i < 1000; i++) {
            commonResource.pop();

            try {
                Thread.sleep(40);
            } catch (Exception e) {
            }

            System.out.println();
        }
    }
}   
